//
//  OnboardingViewController.m
//  Staff
//
//  Created by caiyao on 2/2/15.
//
//

#import "OnboardingViewController.h"
#import "SCAOnboardingView.h"
#import "HookWebViewController.h"

@interface OnboardingViewController ()

@end

@implementation OnboardingViewController

//- (UIStatusBarStyle)preferredStatusBarStyle
//{
//    return UIStatusBarStyleDefault;
//}
//
//- (BOOL)prefersStatusBarHidden
//{
//    return NO;
//}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];


    // Do any additional setup after loading the view.
    NSArray *images = [NSArray arrayWithObjects:@"Onboarding_A_01",@"Onboarding_A_02",@"Onboarding_A_03", nil];
    _onboardingView = [[SCAOnboardingView alloc] initWithFrame:CGRectMake(0, 20, self.view.bounds.size.width, self.view.bounds.size.height-20) images:images];
    _onboardingView.onboardingViewController = self;
    [self.view addSubview:_onboardingView];
    
    if ([self respondsToSelector:@selector(setAutomaticallyAdjustsScrollViewInsets:)]) {
        self.automaticallyAdjustsScrollViewInsets = NO;
    } else {
        _onboardingView.frame = self.view.bounds;
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)showGreenLaisee {
    [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"OnboardingHasShow"];
    [[NSUserDefaults standardUserDefaults] synchronize];
    HookWebViewController *controller = [[HookWebViewController alloc] init];
    [self.navigationController pushViewController:controller animated:YES];
    
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
